Chris Pollett > Old Classses >
CS116b/216

( Print View )

Student Corner:
  [Grades Sec1]
  [Submit Sec1]
  [Class Sign Up Sec1]
  [
Lecture Notes]
  [Discussion Board]

Course Info:
  [Texts & Links]
  [Topics/Outcomes]
  [Outcomes Matrix]
  [Grading]
  [Class Protocols]
  [HW/Quiz Info]
  [Exam Info]
  [Regrades]
  [Honesty]
  [Additional Policies]
  [Announcements]

HW Assignments:
  [Hw1]  [Hw2]  [Hw3]
  [Hw4]  [Hw5]  [Quizzes]

Practice Exams:
  [Midterm]  [Final]

                           












HW#1 --- last modified February 07 2019 04:25:53..

Solution set.

Due date: Feb 12

Files to be submitted:
  Hw1.zip

Purpose: To experiment with various kinds of texture mapping techniques.

Related Course Outcomes:

The main course outcomes covered by this assignment are:

LO1 -- Create a program which generates a simple scene in OpenGL made up of polyhedra and quadrics

LO4 -- Be able to draw a scene using various texture mapping techniques such as a basic texture map, a normal map, a cube map, or projector map.

Specification:

CS 216 students will do the assignment described below and in addition look up the following two papers in the library, read them and write a 1 page summary of what they got out of them.

Blinn, J. F. and Newell, M. E. Texture and Reflection in Computer Generated Images. Communications of the ACM. Volume 19. Issue 10. pp. 542--547. Oct., 1976.

Gardener, G. Y. Visual Simulation of Clouds. Computer Graphics. Volume 19. Issue 3. pp. 297--303. (Proceedings of SIGGRAPCH 1985.)

For both CS116B and CS216 students, I would like you to code up some of the texture mapping techniques we are learning. Your starting point should be either the textbook's Hello World 3D example or your code from one of the projects you made in last semester's CS116a. At the center of your scene, I want you to draw an edge length 2, regular icosahedron centered at the origin. Notice the Wikipedia article gives you the Cartesian Coordinates of the edge length 2 version of this polyhedra. The camera should be initially positioned along the z-axis 10 units from the origin. Initially, each face of the polyhedra should be textured with an image of one of the team members on the project. Recall the book's code for your first assignment last semester has a way to read in an image file. Now imagine three vertices of an equilateral triangle on a sphere. A ray from the origin through the triangle will hit exactly one point on the sphere. That point on the sphere will have a normal, and we can use this to make the triangle into a normal map. When the user hits the `n` key, I want you to draw the scene with a light source 5 units above the viewing position, where the icosahedron is a shiny red material and where the normals used come from the normal map. Finally, I want you to create a background image for cube map purposes. If the user hits the `c` key, I want you to render the scene with the icosahedron now made of a shiny silver material with its usual normals (i.e., not coming from a normal map). The cube map should be used to draw for the background and reflections on this surface.

Point Breakdown

Code contributed to existing project is well-documented and follows the SJSU CS Department guidelines for C++ (Undergrad version). Two paper summaries (1pt each) (Grad Version)2pts
Icasohedron renders as described (1pt). Initial texture drawn is one of your group member's faces. (1pt)2pts
GLUT handling of `n` and `c` keys. (1pt each)2pts
When the `n` key is hit, this icosahedron is drawn with a red shiny material and lighting as described (1pt). Normals for this rendering come from a normal map as described (1pt). 2pts
When the `c` key is hit, the scene is drawn using a cube map (1pt). The icosahedron now uses a silver shiny material on which one can see reflections from the cube map (1pt).2pts
Total10pts